class Dog:
    def __init__(self,name):
        self.name = name

    def game(self):
        print("%s 蹦蹦跳跳..." % self.name)


class XIAOTIANQUAN(Dog):
    def game(self):
        print("%s 飞到天上玩耍" % self.name)


class Person:
    def __init__(self,name):
        self.name = name

    def game_with_dog(self,dog):
        print("%s 和 %s 快乐的玩耍" % (self.name,dog.name))

        dog.game()


wc = Dog("旺财")
xtq = XIAOTIANQUAN("飞天旺财")

xiaoming = Person("小明")

# 使用相同方法输出不同的结果
xiaoming.game_with_dog(wc)
xiaoming.game_with_dog(xtq)